package com.morgankelly.action;

import java.io.InputStream;

import org.apache.commons.io.IOUtils;

@SuppressWarnings("serial")
public class UploadAction extends BaseAction {

	public String input() throws Exception {
		return INPUT;
	}

	public String upload() throws Exception {

		photoStream = IOUtils.toInputStream(photo,"UTF-8");
		return UPLOAD;
	}

	 private String photo;
	 private String photoContentType;
	 private String photoFileName;
	 private InputStream photoStream;
	 
	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public String getPhotoContentType() {
		return photoContentType;
	}

	public void setPhotoContentType(String photoContentType) {
		this.photoContentType = photoContentType;
	}

	public String getPhotoFileName() {
		return photoFileName;
	}

	public void setPhotoFileName(String photoFileName) {
		this.photoFileName = photoFileName;
	}

	public InputStream getPhotoStream() {
		return photoStream;
	}

	public void setPhotoStream(InputStream photoStream) {
		this.photoStream = photoStream;
	}
}